<template>
    <view class="home-wrap u-m-b-20">
        <view  class="content-box u-p-20 u-m-l-20 u-m-r-20">
            <view class="zixun-item u-flex u-flex-col">
                <view class="zixuntitle u-ellipsis-2 u-p-t-10">{{artDetail.title}}</view>
                <view class="zixuntime u-p-t-10 u-p-b-10 u-flex u-row-left u-col-center">
<!--                    <view class="u-from u-m-r-6">来自车管所</view>-->
                    <view class="u-time u-m-r-6">{{ artDetail.createtime }}</view>
                    <view class="u-fabiao">发表于{{ artDetail.region }}</view>
                </view>
                <view class="zixunimg u-p-t-10">
                    <image :src="artDetail.img"></image>
                </view>
                <view class="u-content u-m-t-20 u-w-100s">
                    {{
                        artDetail.content
                    }}
                </view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            zixunId:'',
            artDetail:{

            }
        };
    },
    async onLoad() {
        this.zixunId    = this.$Route.query.zixunId;
        this.initdata()
    },
    methods:{
        // 路由跳转
        jump(path, parmas) {
            this.$Router.push({
                path: path,
                query: parmas
            });
        },
        initdata(){
            let that = this;
            that
                .$http(
                    "login.articleDetail",
                    {
                        id: that.zixunId
                    },
                    "加载中..."
                )
                .then(res => {
                    if (res.code === 1) {
                        that.artDetail = res.data.detail;
                    }
                });
        },
    }
}
</script>

<style lang="scss" scoped>
page{
}
.zixun-item{
    border-radius: 20rpx;
    background: transparent;
    .zixuntitle{
        width: 100%;
        color: #333;
        font-size: 30rpx;
        font-weight: bold;
        line-height: 50rpx;
    }
    .zixunimg{
        width: 100%;
        height: 280rpx;
        image{
            width: 100%;
            height: 100%;
        }
    }
    .zixuntime{
        width: 100%;
        color: #cccccc;
        font-size: 24rpx;
    }
    .u-content{
        text-indent: 30rpx;
        line-height: 50rpx;
        text-align: justfly;
    }
}
</style>
